package com.csu.service.serviceImpl;

import com.csu.entity.News;
import com.csu.mapper.NewsMapper;
import com.csu.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    private NewsMapper newsMapper;
    @Override
    public List<News> getNewsList() {
        return newsMapper.getNewsList();
    }

    @Override
    public List<News> getNewsListByNew(int category) {
        return newsMapper.getNewsListByGroup(category);
    }
}
